<?php
class SuggestAction extends CommonAction{
	
  	

  	function  index(){

						import('ORG.Util.Page');

					 $count=	M('accusation')->count();// 查询总数据记录

					 $Page = new Page($count,C('PAGESIZE'));

					 $show= $Page->show();

	                    $list = M('accusation')->order("id DESC")->limit($Page->firstRow.','.$Page->listRows)->select();

	                    

	                      $this->assign("list",$list);

						  $this->assign("page",$show);

                          $this->display();


       }
       
         function del(){
	        $qstr = $_GET['qstr'];
	     
  		  	$data=M('accusation');  		  
			if(isset($qstr)){
			   $arr=explode(",",$qstr);

			   foreach($arr as $val){

			     $data->where("id=$val")->delete();
			       
			   }
			   $this->success("删除成功！",U('index'));
			}
       
         }	
}
?>